package cn.qyd.javaextend;

public class Animal {
    protected String name;

    protected String food;

    public Animal(String name){
        this.name = name;
    }

    public Animal(String name,String food){
        this.name = name;
        this.food = food;
    }
    void eat(){
        System.out.println(name + " eat " + food);
    }
}
